﻿@using Gluten.Models
@{
    ViewBag.Title = "CMS";
    Layout = "_Layout.cshtml";
}
<h2>@ViewBag.Message</h2>
<table class="menu_table">
    <thead>
        <tr>
            <td>
                Menu
            </td>
            <td colspan="4">
                Action
            </td>
        </tr>
    </thead>
    @foreach (var menu in ViewBag.Menu)
    {
        <tr>
            <td>
                <a href="@Url.Action("Menu", "Admin", new { @id = @menu.Id })"><strong>@menu.Name</strong>
                </a>
            </td>
            <td>
                <a href="@Url.Action("DeleteMenu", "Admin", new { @id = @menu.Id })"><strong>Delete</strong>
                </a>
            </td>
            <td>
                <a href="@Url.Action("MenuHead")/@menu.Id"><strong>Change head</strong>
                </a>
            </td>
            <td>
                <a href="@Url.Action("Label")/@menu.Id"><strong>Change label</strong></a>
            </td>
            <td>
                <a href="@Url.Action("CreatePage", "Admin", new { @id = @menu.Id })"><strong>Add page</strong>
                </a>
            </td>
        </tr>
    }
</table>
<strong><a href ="@Url.Action("CreateMenu", "Admin", new { @id = @Guid.Empty })">Create
    menu →</a> </strong>